<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
      .parent{
        width: 200px;
        height: 200px;
        background-color: skyblue;
        display:flex;
        align-items: center; /*竖直方向居中 */
        align-items:flex-start; /*盒子居顶部对齐 */
        align-items:flex-end; /*盒子居底部对齐 */
        align-items:baseline;/*盒子中第一行文字的基线对齐 */
        align-items:stretch  /* 盒子未设置高度或设置为auto的时候,高度会占满整个父盒子 */
      }
      .parent div{
        width: 50px;
        /* height: 50px; */
        background-color: green;
      }
      .parent .first{
        line-height:50px;  /*让第一个盒子里面的文字垂直居中*/
      }
  </style>
</head>
<body>
  <div class="parent">
      <div class="first">1</div>
      <div>2</div>
      <div>3</div>
  </div>
</body>
</html>